<load target="../../tpl/js/signup_check.js" />
<!--// datepicker javascript plugin load -->
<!--%load_js_plugin("ui")-->
<!--%load_js_plugin("ui.datepicker")-->
<include target="./common_header.html" />
    <h1 style="border-bottom:1px solid #ccc">{$lang->cmd_signup}</h1>
	<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skins/default/signup_form/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
		<p>{$XE_VALIDATOR_MESSAGE}</p>
	</div>
    <form ruleset="@insertMember" id="fo_insert_member" action="./" method="post" enctype="multipart/form-data" class="form-horizontal">
		<input type="hidden" name="act" value="procMemberInsert" />
		<input type="hidden" name="xe_validator_id" value="modules/member/skins/default/signup_form/1" />
		<div class="agreement" cond="$member_config->agreement">
			<div class="text">
				{$member_config->agreement}
			</div>
			<div class="confirm">
				<label for="accept_agree">
					<input type="checkbox" name="accept_agreement" value="Y" id="accept_agree" />
					{$lang->about_accept_agreement}
				</label>
			</div>
		</div>
		<div class="control-group">
			<label for="{$identifierForm->name}" class="control-label"><em style="color:red">*</em> {$identifierForm->title}</label>
			<div class="controls">
				<input type="text"|cond="$identifierForm->name!='email_address'" type="email"|cond="$identifierForm->name=='email_address'" name="{$identifierForm->name}" id="{$identifierForm->name}" value="{$identifierForm->value}" required />
			</div>
		</div>
		<div class="control-group">
			<label for="password" class="control-label"><em style="color:red">*</em> {$lang->password}</label>
			<div class="controls">
				<input type="password" name="password" id="password" value="" required />
				<p class="help-inline">{$lang->about_password}</p>
			</div>
		</div>
		<div class="control-group">
			<label for="password2" class="control-label"><em style="color:red">*</em> {$lang->password3}</label>
			<div class="controls">
				<input type="password" name="password2" id="password2" value="" required />
			</div>
		</div>
		<div class="control-group" loop="$formTags=>$formTag" cond="$formTag->name != 'signature'">
			<label for="{$formTag->name}" class="control-label">{$formTag->title}</label>
			<div class="controls">{$formTag->inputTag}</div>
		</div>
		<div class="control-group">
			<div class="control-label">{$lang->allow_mailing}</div>
			<div class="controls" style="padding-top:5px">
				<label for="mailingYes"><input type="radio" name="allow_mailing" id="mailingYes" value="Y" checked="checked"|cond="$member_info->allow_mailing == 'Y'" /> {$lang->cmd_yes}</label>
				<label for="mailingNo"><input type="radio" name="allow_mailing" id="mailingNo" value="N" checked="checked"|cond="$member_info->allow_mailing != 'Y'" /> {$lang->cmd_no}</label>
			</div>
		</div>
		<div class="control-group">
			<div class="control-label">{$lang->allow_message}</div>
			<div class="controls" style="padding-top:5px">
				<label for="allow_{$key}" loop="$lang->allow_message_type=>$key,$val"><input type="radio" name="allow_message" value="{$key}" checked="checked"|cond="$member_info->allow_message == $key || (!$member_info && $key == 'Y')" id="allow_{$key}" /> {$val}</label>
			</div>
		</div>
		<div class="btnArea" style="border-top:1px solid #ccc;padding-top:10px">
			<input type="submit" value="{$lang->cmd_registration}" class="btn btn-inverse pull-right" />
			<a href="{getUrl('act','','member_srl','')}" class="btn pull-left">{$lang->cmd_cancel}</a>
		</div>
	</form>
<script>
jQuery(function($){
	// label for setup
	$('.control-label[for]').each(function(){
		var $this = $(this);
		if($this.attr('for') == ''){
			$this.attr('for', $this.next().children(':visible:first').attr('id'));
		}
	});
});
(function($){
	$(function(){
		var option = { changeMonth: true, changeYear: true, gotoCurrent: false,yearRange:'-100:+10', dateFormat:'yy-mm-dd', onSelect:function(){

			$(this).prev('input[type="hidden"]').val(this.value.replace(/-/g,""))}
		};
		$.extend(option,$.datepicker.regional['{$lang_type}']);
		$(".inputDate").datepicker(option);
		$(".dateRemover").click(function() {
			$(this).parent().prevAll('input').val('');
			return false;});
	});
})(jQuery);
</script>
<include target="./common_footer.html" />
